#!/user/bin/env node

const argv = process.argv,
      cp = require('child_process');
let file = argv.slice(3,argv.length);
console.log('file:',file);
    

if(argv.length == 2){
  cp.execFile('cat',['01-exec-file.js'],(erroe,out,err)=>{
    if(error){
      console.error(error.message);
    }
    console.log(out.toString('utf8'));
 });
}else{
  cp.execFile(argv[2],[file],(error,out,err)=>{
    if(error){
      console.error(error.message);
    }
    console.log(out.toString('utf8'));
  });
}

